<template>
  <main-container :navList="navList" :options="options" :isShowIframeHeader="false" :is-tab="false" />
</template>

<script>
  import MainContainer from '@/common/components/mainContainerMenu';
  import Api from '../../api/incomeAndExpenditurePlan';

  export default {
    name: 'InformMain',

    components: {
      MainContainer,
    },

    data() {
      return {
        options: [],
        navList: [
          {
            name: '计划总览',
            menuUrl: '/businessPlan/planInfo/planView',
          },
          {
            name: '收入调整事项',
            menuUrl: '/businessPlan/planInfo/planRevenueChange',
          },
          {
            name: '支出调整事项',
            menuUrl: '/businessPlan/planInfo/planExpenditureChange',
          },
          {
            name: '经营收入',
            menuUrl: '/businessPlan/planInfo/planRevenue',
          },
          {
            name: '经营支出',
            menuUrl: '/businessPlan/planInfo/planExpenditure',
          },
          {
            name: '非经营收入',
            menuUrl: '/businessPlan/planInfo/nonOperatingIncome',
          },
          {
            name: '非经营支出',
            menuUrl: '/businessPlan/planInfo/nonOperatingExpenses',
          },
        ],
      };
    },
    mounted() {
      Api.constant({}).then(res => {
        this.$store.state.planconstantMap = res;
      });
      this.plandetail();
    },
    methods: {
      plandetail() {
        if (this.$route.query.planKey) {
          Api.plandetail({ primaryKey: this.$route.query.planKey }).then(res => {
            this.$store.state.planDetail = res;
          });
        }
      },
    },
  };
</script>
